<?php

namespace Viettrans\FrontBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Viettrans\FrontBundle\Entity\Alert
 *
 * @ORM\Table(name="alert")
 * @ORM\HasLifecycleCallbacks()
 * @ORM\Entity(repositoryClass="Viettrans\FrontBundle\Entity\AlertRepository")
 */
class Alert {
/*******************************************************************************
* Begin of user's definitions
*******************************************************************************/
    /**
    * @ORM\prePersist
    */
    public function setDefaultValues() {
		$now = new \DateTime();
	
        if (!isset($this->createdAt)) $this->createdAt = $now;
    }
	
/*******************************************************************************
* End of user's definitions
*******************************************************************************/  
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var integer $userId
     *
     * @ORM\Column(name="userId", type="integer")
     */
    private $userId;
	
    /**
     * @var integer $announcementId
     *
     * @ORM\Column(name="announcementId", type="integer")
     */
    private $announcementId;

    /**
     * @var string $message
     *
     * @ORM\Column(name="message", type="string", length=255)
     */
    private $message;

    /**
     * @var datetime $createdAt
     *
     * @ORM\Column(name="createdAt", type="datetime")
     */
    private $createdAt;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set announcementId
     *
     * @param integer $announcementId
     */
    public function setAnnouncementId($announcementId)
    {
        $this->announcementId = $announcementId;
    }

    /**
     * Get announcementId
     *
     * @return integer 
     */
    public function getAnnouncementId()
    {
        return $this->announcementId;
    }

    /**
     * Set userId
     *
     * @param integer $userId
     */
    public function setUserId($userId)
    {
        $this->userId = $userId;
    }

    /**
     * Get userId
     *
     * @return integer 
     */
    public function getUserId()
    {
        return $this->userId;
    }
	
    /**
     * Set message
     *
     * @param string $message
     */
    public function setMessage($message)
    {
        $this->message = $message;
    }

    /**
     * Get message
     *
     * @return string 
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * Set createdAt
     *
     * @param datetime $createdAt
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;
    }

    /**
     * Get createdAt
     *
     * @return datetime 
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }
}